package  
{
	import org.flixel.FlxG;
	import org.flixel.FlxState;
	import org.flixel.FlxText;
	import org.flixel.plugin.photonstorm.FlxButtonPlus;
	/**
	 * ...
	 * @author Billy Kaifer
	 */
	public class GameOverState extends FlxState
	{
		private var finalScore:FlxText;
		private var playAgainButton:FlxButtonPlus;
		
		
		public function GameOverState() 
		{
			super();
		}
		
		override public function create():void {
			super.create();
			
			finalScore = new FlxText(255, 125, 200, "Final Score: " + Registry.scoreThisGame.toString());
			
			playAgainButton = new FlxButtonPlus(0, 180, playAgain, null, "Play Again");
			playAgainButton.screenCenter();
			
			add(finalScore);
			add(playAgainButton);
			
			FlxG.mouse.show();
		}
		
		private function playAgain():void {
			FlxG.switchState(new MenuState);
		}
	}

}